﻿using System;
using System.Collections.Generic;

namespace YJKArch.AreaStatistical.Statistical
{
	public class ArchAreaStatisticalFloorData
	{
		public ArchAreaStatisticalFloorData(ArchAreaStatisticalFloorData rhs)
		{
			this.m_FloorName = rhs.m_FloorName;
			this.m_Data = rhs.m_Data;
			this.m_FloorFooting = rhs.m_FloorFooting;
		}

		public ArchAreaStatisticalFloorData(string floorName, List<ArchAreaStatisticalRowData> data, ArchAreaStatisticalRowData floorFooting)
		{
			this.m_FloorName = floorName;
			this.m_Data = data;
			this.m_FloorFooting = floorFooting;
		}

		public void ToGridCellList(ref int startRowIndex, ref List<CellInfo> cells)
		{
			List<int> list = new List<int>();
			for (int i = 0; i < this.m_Data.Count + 1; i++)
			{
				list.Add(startRowIndex + i);
			}
			int num = 0;
			List<int> list2 = new List<int>();
			list2.Add(num++);
			cells.Add(new CellInfo(list, list2, this.m_FloorName));
			foreach (ArchAreaStatisticalRowData archAreaStatisticalRowData in this.m_Data)
			{
				archAreaStatisticalRowData.ToGridCellList(1, ref startRowIndex, ref cells);
			}
			this.m_FloorFooting.ToGridCellList(1, ref startRowIndex, ref cells);
		}

		public string m_FloorName;

		public List<ArchAreaStatisticalRowData> m_Data;

		public ArchAreaStatisticalRowData m_FloorFooting;
	}
}
